<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    body {
        background-color: black;
    }

    .box {
        width: 400px;
        height: 300px;
        position: relative;
        margin: 150px auto;
        overflow: hidden;
    }

    .box ul {
        width: 10000%;
        position: absolute;
        left: 0;
        top: 0;
    }

    .box li {
        float: left;
    }

    img {
        width: 400px;
        height: 300px;
    }
</style>

<body>
    <div class="box">
        <ul>
            <li><img src="../img/girl/girl (3).jpg" alt=""></li>
            <li><img src="../img/girl/girl (4).jpg" alt=""></li>
            <li><img src="../img/girl/girl (5).jpg" alt=""></li>
            <li><img src="../img/girl/girl (6).jpg" alt=""></li>
            <li><img src="../img/girl/girl (7).jpg" alt=""></li>
            <li><img src="../img/girl/girl (8).jpg" alt=""></li>


            <li><img src="../img/girl/girl (3).jpg" alt=""></li>


        </ul>
    </div>
</body>
<script>
    var oul = document.getElementsByTagName('ul')[0];
    // console.log(oul);

    var timer = null;
    var num = 0;
    function move() {
        timer = setInterval(function () {
            num += 1;
            oul.style.left = -num + 'px';
            if (num == 2400) {
                num = 0;
            }
        }, 1)
    }
    move()
</script>

</html>